// 按需导入
import { Loginservice } from "@/utils/request.js";
// 获取
export function reqGetRoleInfo(data) {
  return Loginservice({
    url: '/RoleConfig/GetRoleInfo2',
    method: 'post',
    data: {
      ...data,
      SystemName
    }
  })
}


// 获取菜单树
export function reqGetMenuTree(PRID) {
  return Loginservice({
    url: '/RoleConfig/GetMenuTree2',
    method: 'post',
    data: {
      SystemName,
      PRID
    }
  })
}


// 获取RID 对应的菜单权限
export function reqGetRoleMenuByRID(RID) {
  return Loginservice({
    // url: '/RoleConfig/GetRoleMenuByRID',
    url: '/RoleConfig/GetRoleMenuByRID2',
    method: 'post',
    data: {
      RID,
      SystemName
    }
  })
}

// 新增
export function reqAddRoleInfo(Info, menuIds) {
  return Loginservice({
    // url: '/RoleConfig/AddRoleInfo',
    url: '/RoleConfig/AddRoleInfo2',
    method: 'post',
    data: {
      Info,
      menuIds,
      SystemName
    }
  })
}


// 修改
export function reqUpdateRoleInfo(Info, menuIds) {
  return Loginservice({
    // url: '/RoleConfig/UpdateRoleInfo',
    url: '/RoleConfig/UpdateRoleInfo2',
    method: 'post',
    data: {
      Info,
      menuIds,
      SystemName
    }
  })
}

//删除
export function reqDeleteRoleInfo(roleIds) {
  return Loginservice({
    // url: '/RoleConfig/DeleteRoleInfo',
    url: '/RoleConfig/DeleteRoleInfo2',
    method: 'post',
    data: {
      roleIds,
      SystemName
    }
  })
}


